﻿package com.dg.gaming.api.common.util{

	/**
	 * ...
	 * @author 
	 */
	public class DGLabels extends AbstractProperties {

		// name of the lookandfeel properties file
		private static const DEFAULT_FILENAME:String="labels";
		private static var instance:DGLabels=null;

		/**
		 * Private constructor (Can only be called by the getInstance() method.
		 */
		public function DGLabels() {
			super(DEFAULT_FILENAME);
		}

		/**
		 * Accessor to singleton instance of this class.
		 *
		 * @return  Instance of this class.
		 */
		public static function getInstance():DGLabels {
			if (instance==null) {
				instance=new DGLabels  ;
			}

			return instance;
		}

		/**
		 * Return an error string from an error number.
		 *
		 * @param errorCode   Error number.
		 * @return            Error description.
		 */
		public static function getError(errorCode:int):String {
			return getInstance().getValue("error."+errorCode);
		}
	}
}